Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for pydantic-v1 #128

Merged
merged 3 commits into from
Mar 4, 2024
Merged

Adding support for pydantic-v1 #128

merged 3 commits into from
Mar 4, 2024

Conversation

vminfant
Copy link
Collaborator

@vminfant vminfant commented Mar 1, 2024

Describe your changes

CDF notebooks uses pyodide which still relies on pydantic-v1 (1.10.7 to be precise). cdffs was migrated to pydantic v2 without any backward compatibility for pydantic-v1 and it creates a problem for the users who wish to use cdffs on CDF notebooks.

so, introducing a backward compatibility for pydantic-v1 to allow users to use CDF notebooks. It is counterintuitive approach but no other choice! :)

Checklist

  • I have added/updated the necessary documentation for the changes.
  • I have added/updated the tests for the changes.
  • I have updated the poetry version. Refer version upgrades.
  • I have updated the version in __init__.py
  • I have updated the CHANGELOG.md

More tests covering pydantic v1 will be added later. Is being tracked in #129

Copy link
Contributor

@pavelzubarev pavelzubarev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would you need to support v1? it needs to be updated and may create a lot of issues in runtime. That will not work at all as a package cdffs based on pydantic-v2, which has been released for about a year. It will require anyone who uses cdffs to install pydantic v2+. I don't think we should go back and support versions that are not maintained, as it will create nightmare most likely.

@vminfant
Copy link
Collaborator Author

vminfant commented Mar 4, 2024

Why would you need to support v1? it needs to be updated and may create a lot of issues in runtime. That will not work at all as a package cdffs based on pydantic-v2, which has been released for about a year. It will require anyone who uses cdffs to install pydantic v2+. I don't think we should go back and support versions that are not maintained, as it will create nightmare most likely.

It is mainly to allow users to use both CDF Notebooks.

CDF Notebooks uses pyodide which still relies on pydantic-v1 (1.10.7 to be precise).

@vminfant vminfant merged commit 0d5307e into main Mar 4, 2024
3 checks passed
@vminfant vminfant deleted the fix/pydantic-version branch March 4, 2024 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants